﻿@namespace CyssBlazor.Shared.Pages.Orders.SaleOrder
@inherits BasePage
@page "/SaleOrder/List"

<TableGroup>
    <Table TItem="SaleOrderModel" ShowLoading="true" IsFixedHeader=true
           ShowToolbar="true" ShowDefaultButtons="false"
           ShowExtendButtons="true"
           OnSaveAsync="OnSaveAsync" OnDeleteAsync="OnDeleteAsync"
           ShowSearch="true" ShowAdvancedSearch="false" ShowRefresh="true" IsStriped="true" IsBordered="true" ShowLineNo="true"
           IsPagination="true" OnQueryAsync="@OnQueryAsync">

        <TableColumns>
            <TableColumn @bind-Field="@context.Number" Readonly="true" />
            <TableColumn @bind-Field="@context.OrderDate" />
            <TableColumn @bind-Field="@context.CustomerName" Editable="false"></TableColumn>
            <TableColumn @bind-Field="@context.TotalAmount" Editable="false"></TableColumn>
            <TableColumn @bind-Field="@context.CreateByName" Editable="false" />
            <TableColumn @bind-Field="@context.CreateDate" Editable="false" />
            <TableColumn @bind-Field="@context.UpdateByName" Editable="false"></TableColumn>
            <TableColumn @bind-Field="@context.UpdateDate" Editable="false"></TableColumn>
        </TableColumns>
        <RowButtonTemplate Context="item">
            @if (this.IsPermission("Edit"))
                    {
            <TableCellButtonItem IsAsync="true" Text="编辑" Item="item" OnClickWithoutRenderItem="OpenEdit"></TableCellButtonItem>
                    }
        </RowButtonTemplate>
    </Table>
</TableGroup>
